//-----------------------------------------------------------------------------
// <copyright file="ODataActionTestsProxyGeneratedCode.cs" company=".NET Foundation">
//      Copyright (c) .NET Foundation and Contributors. All rights reserved. 
//      See License.txt in the project root for license information.
// </copyright>
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.34003
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// Generation date: 12/23/2013 10:32:34 PM
namespace ODataClient.ProductsContextReference.Service
{
    /// <summary>
    /// There are no comments for ODataActionTests_Product in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ID
    /// </KeyProperties>
    [global::Microsoft.OData.Client.KeyAttribute("ID")]
    public partial class ODataActionTests_Product
    {
        /// <summary>
        /// Create a new ODataActionTests_Product object.
        /// </summary>
        /// <param name="ID">Initial value of ID.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public static ODataActionTests_Product CreateODataActionTests_Product(int ID)
        {
            ODataActionTests_Product oDataActionTests_Product = new ODataActionTests_Product();
            oDataActionTests_Product.ID = ID;
            return oDataActionTests_Product;
        }
        /// <summary>
        /// There are no comments for Property ID in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public int ID
        {
            get
            {
                return this._ID;
            }
            set
            {
                this.OnIDChanging(value);
                this._ID = value;
                this.OnIDChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private int _ID;
        partial void OnIDChanging(int value);
        partial void OnIDChanged();
        /// <summary>
        /// There are no comments for Property Name in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this._Name = value;
                this.OnNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private string _Name;
        partial void OnNameChanging(string value);
        partial void OnNameChanged();
        /// <summary>
        /// There are no comments for Property ReleaseDate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::System.Nullable<global::System.DateTimeOffset> ReleaseDate
        {
            get
            {
                return this._ReleaseDate;
            }
            set
            {
                this.OnReleaseDateChanging(value);
                this._ReleaseDate = value;
                this.OnReleaseDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::System.Nullable<global::System.DateTimeOffset> _ReleaseDate;
        partial void OnReleaseDateChanging(global::System.Nullable<global::System.DateTimeOffset> value);
        partial void OnReleaseDateChanged();
        /// <summary>
        /// There are no comments for Property SupportedUntil in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::System.Nullable<global::System.DateTimeOffset> SupportedUntil
        {
            get
            {
                return this._SupportedUntil;
            }
            set
            {
                this.OnSupportedUntilChanging(value);
                this._SupportedUntil = value;
                this.OnSupportedUntilChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::System.Nullable<global::System.DateTimeOffset> _SupportedUntil;
        partial void OnSupportedUntilChanging(global::System.Nullable<global::System.DateTimeOffset> value);
        partial void OnSupportedUntilChanged();
    }
    /// <summary>
    /// There are no comments for ODataActionTests_RatedProduct in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ID
    /// </KeyProperties>
    [global::Microsoft.OData.Client.KeyAttribute("ID")]
    public partial class ODataActionTests_RatedProduct : ODataActionTests_Product
    {
        /// <summary>
        /// Create a new ODataActionTests_RatedProduct object.
        /// </summary>
        /// <param name="ID">Initial value of ID.</param>
        /// <param name="rating">Initial value of Rating.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public static ODataActionTests_RatedProduct CreateODataActionTests_RatedProduct(int ID, int rating)
        {
            ODataActionTests_RatedProduct oDataActionTests_RatedProduct = new ODataActionTests_RatedProduct();
            oDataActionTests_RatedProduct.ID = ID;
            oDataActionTests_RatedProduct.Rating = rating;
            return oDataActionTests_RatedProduct;
        }
        /// <summary>
        /// There are no comments for Property Rating in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public int Rating
        {
            get
            {
                return this._Rating;
            }
            set
            {
                this.OnRatingChanging(value);
                this._Rating = value;
                this.OnRatingChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private int _Rating;
        partial void OnRatingChanging(int value);
        partial void OnRatingChanged();
    }
}
namespace ModelBuilder.ActionTest.Default
{
    /// <summary>
    /// There are no comments for Container in the schema.
    /// </summary>
    public partial class Container : global::Microsoft.OData.Client.DataServiceContext
    {
        /// <summary>
        /// Initialize a new Container object.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public Container(global::System.Uri serviceRoot) :
            base(serviceRoot, global::Microsoft.OData.Client.ODataProtocolVersion.V4)
        {
            this.ResolveName = new global::System.Func<global::System.Type, string>(this.ResolveNameFromType);
            this.OnContextCreated();
            this.Format.LoadServiceModel = GeneratedEdmModel.GetInstance;
            this.Format.UseJson();
        }
        partial void OnContextCreated();
        /// <summary>
        /// Since the namespace configured for this service reference
        /// in Visual Studio is different from the one indicated in the
        /// server schema, use type-mappers to map between the two.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        protected string ResolveNameFromType(global::System.Type clientType)
        {
            return clientType.FullName;
        }
        /// <summary>
        /// There are no comments for ODataActionTests_Products1 in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::Microsoft.OData.Client.DataServiceQuery<ODataClient.ProductsContextReference.Service.ODataActionTests_Product> ODataActionTests_Products1
        {
            get
            {
                if ((this._ODataActionTests_Products1 == null))
                {
                    this._ODataActionTests_Products1 = base.CreateQuery<ODataClient.ProductsContextReference.Service.ODataActionTests_Product>("ODataActionTests_Products1");
                }
                return this._ODataActionTests_Products1;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::Microsoft.OData.Client.DataServiceQuery<ODataClient.ProductsContextReference.Service.ODataActionTests_Product> _ODataActionTests_Products1;
        /// <summary>
        /// There are no comments for ODataActionTests_Products2 in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::Microsoft.OData.Client.DataServiceQuery<ODataClient.ProductsContextReference.Service.ODataActionTests_Product> ODataActionTests_Products2
        {
            get
            {
                if ((this._ODataActionTests_Products2 == null))
                {
                    this._ODataActionTests_Products2 = base.CreateQuery<ODataClient.ProductsContextReference.Service.ODataActionTests_Product>("ODataActionTests_Products2");
                }
                return this._ODataActionTests_Products2;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::Microsoft.OData.Client.DataServiceQuery<ODataClient.ProductsContextReference.Service.ODataActionTests_Product> _ODataActionTests_Products2;
        /// <summary>
        /// There are no comments for ODataActionTests_Products1 in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public void AddToODataActionTests_Products1(ODataClient.ProductsContextReference.Service.ODataActionTests_Product oDataActionTests_Product)
        {
            base.AddObject("ODataActionTests_Products1", oDataActionTests_Product);
        }
        /// <summary>
        /// There are no comments for ODataActionTests_Products2 in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public void AddToODataActionTests_Products2(ODataClient.ProductsContextReference.Service.ODataActionTests_Product oDataActionTests_Product)
        {
            base.AddObject("ODataActionTests_Products2", oDataActionTests_Product);
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private abstract class GeneratedEdmModel
        {
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
            private static global::Microsoft.OData.Edm.IEdmModel ParsedModel = LoadModelFromString();
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
            private const string Edmx = @"<edmx:Edmx Version=""4.0"" xmlns:edmx=""http://docs.oasis-open.org/odata/ns/edmx"">
  <edmx:DataServices m:DataServiceVersion=""4.0"" m:MaxDataServiceVersion=""4.0"" xmlns:m=""http://docs.oasis-open.org/odata/ns/metadata"">
    <Schema Namespace=""Microsoft.Test.E2E.AspNet.OData.ModelBuilder"" xmlns=""http://docs.oasis-open.org/odata/ns/edm"">
      <EntityType Name=""ODataActionTests_Product"">
        <Key>
          <PropertyRef Name=""ID"" />
        </Key>
        <Property Name=""ID"" Type=""Edm.Int32"" Nullable=""false"" />
        <Property Name=""Name"" Type=""Edm.String"" />
        <Property Name=""ReleaseDate"" Type=""Edm.DateTimeOffset"" />
        <Property Name=""SupportedUntil"" Type=""Edm.DateTimeOffset"" />
      </EntityType>
      <EntityType Name=""ODataActionTests_RatedProduct"" BaseType=""Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product"">
        <Property Name=""Rating"" Type=""Edm.Int32"" Nullable=""false"" />
      </EntityType>
    </Schema>
    <Schema Namespace=""Default"" xmlns=""http://docs.oasis-open.org/odata/ns/edm"">
      <Action Name=""ExtendSupportDate1"" IsBound=""true"">
        <ReturnType Type=""Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product"" />
        <Parameter Name=""bindingParameter"" Type=""Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product"" />
        <Parameter Name=""newDate"" Type=""Edm.DateTimeOffset"" Nullable=""false"" />
      </Action>
      <Action Name=""ExtendSupportDates1"" IsBound=""true"">
        <ReturnType Type=""Collection(Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product)"" Nullable=""false"" />
        <Parameter Name=""bindingParameter"" Type=""Collection(Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product)"" Nullable=""false"" />
        <Parameter Name=""productIds"" Type=""Collection(Edm.Int32)"" Nullable=""false"" />
        <Parameter Name=""newDate"" Type=""Edm.DateTimeOffset"" Nullable=""false"" />
      </Action>
      <Action Name=""UpdateRating1"" IsBound=""true"">
        <ReturnType Type=""Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product"" />
        <Parameter Name=""bindingParameter"" Type=""Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_RatedProduct"" />
        <Parameter Name=""newRating"" Type=""Edm.Int32"" Nullable=""false"" />
      </Action>
      <Action Name=""UpdateRatings1"" IsBound=""true"">
        <ReturnType Type=""Collection(Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product)"" Nullable=""false"" />
        <Parameter Name=""bindingParameter"" Type=""Collection(Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_RatedProduct)"" Nullable=""false"" />
        <Parameter Name=""productIds"" Type=""Collection(Edm.Int32)"" Nullable=""false"" />
        <Parameter Name=""newRating"" Type=""Edm.Int32"" Nullable=""false"" />
      </Action>
      <Action Name=""ExtendSupportDate2"" IsBound=""true"">
        <ReturnType Type=""Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product"" />
        <Parameter Name=""bindingParameter"" Type=""Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product"" />
        <Parameter Name=""newDate"" Type=""Edm.DateTimeOffset"" Nullable=""false"" />
      </Action>
      <Action Name=""ExtendSupportDates2"" IsBound=""true"">
        <ReturnType Type=""Collection(Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product)"" Nullable=""false"" />
        <Parameter Name=""bindingParameter"" Type=""Collection(Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product)"" Nullable=""false"" />
        <Parameter Name=""productIds"" Type=""Collection(Edm.Int32)"" Nullable=""false"" />
        <Parameter Name=""newDate"" Type=""Edm.DateTimeOffset"" Nullable=""false"" />
      </Action>
      <Action Name=""UpdateRating2"" IsBound=""true"">
        <ReturnType Type=""Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product"" />
        <Parameter Name=""bindingParameter"" Type=""Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_RatedProduct"" />
        <Parameter Name=""newRating"" Type=""Edm.Int32"" Nullable=""false"" />
      </Action>
      <Action Name=""UpdateRatings2"" IsBound=""true"">
        <ReturnType Type=""Collection(Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product)"" Nullable=""false"" />
        <Parameter Name=""bindingParameter"" Type=""Collection(Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_RatedProduct)"" Nullable=""false"" />
        <Parameter Name=""productIds"" Type=""Collection(Edm.Int32)"" Nullable=""false"" />
        <Parameter Name=""newRating"" Type=""Edm.Int32"" Nullable=""false"" />
      </Action>
      <EntityContainer Name=""Container"" m:IsDefaultEntityContainer=""true"">
        <EntitySet Name=""ODataActionTests_Products1"" EntityType=""Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product"" />
        <EntitySet Name=""ODataActionTests_Products2"" EntityType=""Microsoft.Test.E2E.AspNet.OData.ModelBuilder.ODataActionTests_Product"" />
        <ActionImport Name=""ExtendSupportDate1"" Action=""Default.ExtendSupportDate1"" EntitySet=""ODataActionTests_Products1"" />
        <ActionImport Name=""ExtendSupportDates1"" Action=""Default.ExtendSupportDates1"" EntitySet=""ODataActionTests_Products1"" />
        <ActionImport Name=""UpdateRating1"" Action=""Default.UpdateRating1"" EntitySet=""ODataActionTests_Products1"" />
        <ActionImport Name=""UpdateRatings1"" Action=""Default.UpdateRatings1"" EntitySet=""ODataActionTests_Products1"" />
        <ActionImport Name=""ExtendSupportDate2"" Action=""Default.ExtendSupportDate2"" EntitySet=""ODataActionTests_Products2"" />
        <ActionImport Name=""ExtendSupportDates2"" Action=""Default.ExtendSupportDates2"" EntitySet=""ODataActionTests_Products2"" />
        <ActionImport Name=""UpdateRating2"" Action=""Default.UpdateRating2"" EntitySet=""ODataActionTests_Products2"" />
        <ActionImport Name=""UpdateRatings2"" Action=""Default.UpdateRatings2"" EntitySet=""ODataActionTests_Products2"" />
      </EntityContainer>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>";
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
            public static global::Microsoft.OData.Edm.IEdmModel GetInstance()
            {
                return ParsedModel;
            }
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
            private static global::Microsoft.OData.Edm.IEdmModel LoadModelFromString()
            {
                global::System.Xml.XmlReader reader = CreateXmlReader(Edmx);
                try
                {
                    return global::Microsoft.OData.Edm.Csdl.CsdlReader.Parse(reader);
                }
                finally
                {
                    ((global::System.IDisposable)(reader)).Dispose();
                }
            }
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
            private static global::System.Xml.XmlReader CreateXmlReader(string edmxToParse)
            {
                return global::System.Xml.XmlReader.Create(new global::System.IO.StringReader(edmxToParse));
            }
        }
    }
}
